package thread;

public class Novisibility {
	private static boolean ready;
	private static int number;
	private static class ReaderThread extends Thread{

		@Override public void run(){
			while(!ready){
				Thread.yield();
				System.out.println("hello world");
			}
			System.out.println(number);
		}
	}
	public static void main(String[] args) throws InterruptedException {
		System.out.println(ready);
		new ReaderThread().start();
		Thread.sleep(2009);
		System.out.println(number);
		System.out.println(ready);
		number=43;
		ready=true;
	}
}
